const mongoose = require('mongoose')



const  goods = mongoose.Schema({
    goodname:String,
    goodnum:{
        type:Number,
        default:1000,
    },
    price:Number,
    desc:String,
    imgurl:String,
    status:{
        type:Number,
        enum:[1,2],
        default:1   //表示 1 上架  2 下架 
    },
    createTime: {
        type: Date,
        default: new Date()
    }
})

const GoodModel = mongoose.model('goods', goods)




module.exports = {
    GoodModel
}